<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var time = new Date;
        // console.log(time);
        // var time = new Date("2021-2-2")
        var time = new Date
        console.log(time.getFullYear());
        console.log(time.getMonth());
        console.log(time.getDate());
        console.log(time.getDay());
        console.log(time.getHours());
        console.log(time.getMinutes());
        console.log(time.getSeconds());
    </script>
</body>
</html>